/**
 * @Title wheel-utils系统
 * @Package com.senyint.sys.utils.qrcode
 * @Description TODO
 * @Company 心医国际数字医疗系统（大连） 有限公司
 * @Copyright (c) 2016, 2017, Senyint. All rights reserved.
 * @date 2018年5月31日 下午7:22:18 
 * @author WangNaifei
 * @version 1.0
 */

package com.senyint.sys.utils.zxing;

import java.util.Map;

import com.google.zxing.EncodeHintType;
import com.senyint.sys.utils.image.ImageFormat;

/**
 * {@code QrCodeGenerateParam}
 * 
 * @Description: TODO
 *               <p>
 * @author WangNaifei,WangNaifei@senyint.com
 * @date 2018年5月31日 下午7:22:18
 * @version 1.0
 * @since jdk1.7+
 */
public class ZxingEncodeCodeParam {

	private ImageFormat imageFormat = ImageFormat.png;
	private String content;
	private Map<EncodeHintType, ?> hints; // 二维码参数
	private int width = 300; // 二维码宽度
	private int height = 300; // 二维码高度
	private int onColor = 0xFF000000; // 前景色 黑
	private int offColor = 0xFFFFFFFF; // 背景色 白
	private int margin = 1; // 白边大小，取值范围0~4
	private int level = 3; // 二维码容错率 ErrorCorrectionLevel.H

	private String logoPath;

	/**
	 * @Title: ZxingEncodeCodeParam
	 * @Description: 构造
	 */
	public ZxingEncodeCodeParam() {
	}

	/**
	 * @Title: QrCodeGenerateParam
	 * @Description: 构造
	 */
	public ZxingEncodeCodeParam(String content) {
		this.content = content;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public String getImageFormat() {
		return imageFormat.name();
	}

	public void setImageFormat(String imageFormat) {
		this.imageFormat = ImageFormat.fromString(imageFormat);
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Map<EncodeHintType, ?> getHints() {
		return hints;
	}

	public void setHints(Map<EncodeHintType, ?> hints) {
		this.hints = hints;
	}

	public int getOnColor() {
		return onColor;
	}

	public void setOnColor(int onColor) {
		this.onColor = onColor;
	}

	public int getOffColor() {
		return offColor;
	}

	public void setOffColor(int offColor) {
		this.offColor = offColor;
	}

	public int getMargin() {
		return margin;
	}

	public void setMargin(int margin) {
		this.margin = margin;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public String getLogoPath() {
		return logoPath;
	}

	public void setLogoPath(String logoPath) {
		this.logoPath = logoPath;
	}

}
